package com.tenbent.product.center.insures.bo;

import com.tenbent.product.base.bo.BizObject;
import com.tenbent.product.base.mybatis.annotations.TypeAlias;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * 保障项目小分类项目
 *
 * @author Randy
 *
 *         Created by ThinkPad on 2017/8/21.
 */
@Entity
@Table(name = "pc_safeguard_category")
@TypeAlias("safeguardCategory")
public class SafeguardCategory extends BizObject {

	/** 保障项目大分类代码 **/
	@Column(name = "type_code")
	private String typeCode;

	/** 保障项目代码 **/
	@Column(name = "category_code")
	private String categoryCode;

	/** 保障项目内容 **/
	@Column(name = "category_content")
	private String categoryContent;

	/** 保障额度 **/
	@Column(name = "category_amount")
	private String categoryAmount;

	public String getTypeCode() {
		return typeCode;
	}

	public void setTypeCode(String typeCode) {
		this.typeCode = typeCode;
	}

	public String getCategoryCode() {
		return categoryCode;
	}

	public void setCategoryCode(String categoryCode) {
		this.categoryCode = categoryCode;
	}

	public String getCategoryContent() {
		return categoryContent;
	}

	public void setCategoryContent(String categoryContent) {
		this.categoryContent = categoryContent;
	}

	public String getCategoryAmount() {
		return categoryAmount;
	}

	public void setCategoryAmount(String categoryAmount) {
		this.categoryAmount = categoryAmount;
	}

	@Override
	public boolean equals(Object o) {
		if (this == o)
			return true;
		if (o == null || getClass() != o.getClass())
			return false;

		SafeguardCategory that = (SafeguardCategory) o;

		if (typeCode != null ? !typeCode.equals(that.typeCode) : that.typeCode != null)
			return false;
		if (categoryCode != null ? !categoryCode.equals(that.categoryCode) : that.categoryCode != null)
			return false;
		if (categoryContent != null ? !categoryContent.equals(that.categoryContent) : that.categoryContent != null)
			return false;
		return categoryAmount != null ? categoryAmount.equals(that.categoryAmount) : that.categoryAmount == null;

	}

	@Override
	public int hashCode() {
		int result = typeCode != null ? typeCode.hashCode() : 0;
		result = 31 * result + (categoryCode != null ? categoryCode.hashCode() : 0);
		result = 31 * result + (categoryContent != null ? categoryContent.hashCode() : 0);
		result = 31 * result + (categoryAmount != null ? categoryAmount.hashCode() : 0);
		return result;
	}

	@Override
	public String toString() {
		return "SafeguardCategory{" + "typeCode='" + typeCode + '\'' + ", categoryCode='" + categoryCode + '\''
				+ ", categoryContent='" + categoryContent + '\'' + ", categoryAmount='" + categoryAmount + '\'' + '}';
	}
}
